package cn.credit.ms.service.impl;

import cn.credit.ms.model.TUser;
import cn.credit.ms.model.TUserCriteria;
import cn.credit.ms.model.mapper.TUserMapper;
import cn.credit.ms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by cuilijin on 2017/5/19.
 */
@Repository
public class UserServiceImpl  implements UserService {

    @Autowired
    private TUserMapper userMapper;

    @Override
    public List<TUser> getList(Long id) {
        TUserCriteria example = new TUserCriteria();
        TUserCriteria.Criteria criteria = example.createCriteria();
        criteria.andIdEqualTo(id.intValue());
        return userMapper.selectByExample(example);
    }
}
